package com.tjetc.dao.impl;

import com.tjetc.dao.RoleDao;
import com.tjetc.domain.Role;
import com.tjetc.utils.Db;
import org.apache.commons.dbutils.handlers.BeanHandler;

import java.sql.SQLException;

public class RoleDaoImpl implements RoleDao {
    @Override
    public Role getById(int id) throws SQLException {
        return Db.runner0().query("select * from role where id = ?",new BeanHandler<>(Role.class),id);
    }
}
